<?php

namespace App\Modules\Device\Models;


use Illuminate\Database\Eloquent\Model;

/**
 * @package App\Modules\Device\Models
 */
class Facory extends Model
{
    protected $table = 'facory';

    protected $fillable = ['id','admin_user_id','brand_name','facory_name', 'img', 'device_type', 'status', 'created_at', 'updated_at'];

    //获取商家
    public static function facoryList(){

        return self::where('status',1)->paginate(10);
    }

    //添加品牌
    public static function addFacory($param){
        return self::create($param);
    }

    //跟新品牌
    public static function upFacory($id,$param){
        return self::where('id',$id)->update($param);
    }

}